/*
 * Created by JFormDesigner on Sun Nov 10 22:19:07 CST 2024
 */

package com.ch14;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 * @author jjchen
 */
public class Home1 extends JFrame {
    public Home1(String string) {
        initComponents();
    }

    private void button1MouseClicked(MouseEvent e) {
        addStu as =new addStu();
        as.setVisible(true);
    }

    private void button2MouseClicked(MouseEvent e) {
        editStu ed =new editStu();
        ed.setVisible(true);
    }

    private void button3MouseClicked(MouseEvent e) {
        displayStu dp =new displayStu();
        dp.setVisible(true);
    }

    private void button4MouseClicked(MouseEvent e) {
        manageStu man =new manageStu();
        man.setVisible(true);
    }

    private void button5MouseClicked(MouseEvent e) {
        tiedStu td =new tiedStu();
        td.setVisible(true);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        button1 = new JButton();
        button2 = new JButton();
        button3 = new JButton();
        button4 = new JButton();
        button5 = new JButton();
        label1 = new JLabel();
        label2 = new JLabel();
        label3 = new JLabel();
        label4 = new JLabel();
        label5 = new JLabel();
        label6 = new JLabel();

        //======== this ========
        var contentPane = getContentPane();
        contentPane.setLayout(null);

        //---- button1 ----
        button1.setText("\u5b66\u751f\u4fe1\u606f\u6dfb\u52a0");
        button1.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button1MouseClicked(e);
            }
        });
        contentPane.add(button1);
        button1.setBounds(165, 95, 125, 35);

        //---- button2 ----
        button2.setText("\u5b66\u751f\u4fe1\u606f\u7f16\u8f91");
        button2.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button2MouseClicked(e);
            }
        });
        contentPane.add(button2);
        button2.setBounds(200, 145, 120, 35);

        //---- button3 ----
        button3.setText("\u67e5\u8be2\u4fe1\u606f");
        button3.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button3MouseClicked(e);
            }
        });
        contentPane.add(button3);
        button3.setBounds(240, 190, 105, 35);

        //---- button4 ----
        button4.setText("\u73ed\u7ea7\u7ba1\u7406");
        button4.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button4MouseClicked(e);
            }
        });
        contentPane.add(button4);
        button4.setBounds(275, 235, 105, 35);

        //---- button5 ----
        button5.setText("\u5b66\u751f&\u73ed\u7ea7\u5173\u7cfb\u7ed1\u5b9a");
        button5.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button5MouseClicked(e);
            }
        });
        contentPane.add(button5);
        button5.setBounds(300, 280, button5.getPreferredSize().width, 40);

        //---- label1 ----
        label1.setText("\u529f\u80fd1\uff1a");
        contentPane.add(label1);
        label1.setBounds(new Rectangle(new Point(70, 100), label1.getPreferredSize()));

        //---- label2 ----
        label2.setText("\u529f\u80fd2\uff1a");
        contentPane.add(label2);
        label2.setBounds(new Rectangle(new Point(70, 155), label2.getPreferredSize()));

        //---- label3 ----
        label3.setText("\u529f\u80fd3\uff1a");
        contentPane.add(label3);
        label3.setBounds(new Rectangle(new Point(70, 205), label3.getPreferredSize()));

        //---- label4 ----
        label4.setText("\u529f\u80fd4\uff1a");
        contentPane.add(label4);
        label4.setBounds(new Rectangle(new Point(70, 255), label4.getPreferredSize()));

        //---- label5 ----
        label5.setText("\u529f\u80fd5\uff1a");
        contentPane.add(label5);
        label5.setBounds(new Rectangle(new Point(70, 295), label5.getPreferredSize()));

        //---- label6 ----
        label6.setText("\u5b66\u751f\u7ba1\u7406\u7cfb\u7edf");
        label6.setFont(label6.getFont().deriveFont(Font.BOLD, label6.getFont().getSize() + 8f));
        contentPane.add(label6);
        label6.setBounds(155, 10, 165, 40);

        contentPane.setPreferredSize(new Dimension(475, 365));
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JButton button1;
    private JButton button2;
    private JButton button3;
    private JButton button4;
    private JButton button5;
    private JLabel label1;
    private JLabel label2;
    private JLabel label3;
    private JLabel label4;
    private JLabel label5;
    private JLabel label6;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
